package com.gupaoedu.vip.pattern.singleton.lazy;

/**
 * Created by Administrator on 2018/3/18.
 */
public class LazyInnerClass {

    private static LazyInnerClass lazyInnerClass = null;

    /**
     * 通过JVM机制实现单例
     * @return
     */
    public static LazyInnerClass getInstance(){
        return InnerClass.clazz;
    }

    private static class InnerClass{
        public static LazyInnerClass clazz = new LazyInnerClass();
    }
}
